from django.http import HttpResponse,HttpResponseRedirect,HttpResponseBadRequest,JsonResponse
from django.views.decorators.csrf import csrf_exempt 
from django.shortcuts import render
from .getJson.recommend import originalLine

"""
输入页面
"""
def init_stroke_conditions(request):
    return render(request,'init_stroke_conditions.html')


"""
展示推荐规划
"""

@csrf_exempt
def getCondition(request):
    data = {'flag':True}   #推荐完成
    return JsonResponse(data)

def recommendLine(request):
    original_line = originalLine()
    return render(request,'recommendLine.html',{'original_line':original_line})

#ajax调用推荐点
@csrf_exempt
def ajaxRecommentLine(request):
    original_line = originalLine()
    return JsonResponse(original_line)
